import request from "../http/request";

const api = {
  billStatis: "/api/getBillStatis",
  billList: "/api/getBillList",
  billDetails: "/api/getBillDetails",
};

// 获取账单详情
export async function getBillDetails(params = {}): Promise<API.Details> {
  return await request.get(api.billDetails, { params });
}

// 获取账单列表
export async function getBillList(params = {}): Promise<API.BillListSection[]> {
  return await request.get(api.billList, { params });
}

// 获取账单统计数据
export async function getBillStatis(params = {}): Promise<API.StatisData> {
  return await request.get(api.billStatis, { params });
}
